Leakage of gas from gas installations, pipe lines and their components might be very dangerous for the environment, and human and animal health, especially if the gas is toxic, flammable or corrosive. If such gas leak happens e.g. as an accident, it is important to detect the leak as soon as possible. The leak may also be quantitatively measured to determine if the leak is above certain threshold value for alarm, and also to determine any further steps that should be taken to stop the leak. Therefore, gas detectors may be used in areas where this potential for gas leaks.